package org.redis.attribute;

import jakarta.annotation.Resource;
import lombok.Data;
import org.redis.attribute.RedisClusterProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Configuration;

/**
 * RedisConfigProperties
 *
 * @author grl
 * @date 2023/3/17
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "spring.data.redis")
public class RedisConfigProperties {


    private String host = "";

    private String port = "6379";

    private String password = "";

    private Integer database = 0;

    private Integer retryInterval = 5000 ;

    private Integer timeout;

    private Integer connectTimeout = 10000;

    @Resource
    private RedisClusterProperties cluster;

}
